#pragma once

/*
 * The abstract of each term in one polynomial
 * @author hujingfei914@msn.com
 */
class term
{
public:
	term(void);
	term(unsigned int c, unsigned int e);	
	void setCoef(unsigned int c);
	void setExp(unsigned int e);
	friend term operator *(term &t1, term &t2);
	friend bool operator ==(term &t1, term &t2);
	friend bool operator !=(term &t1, term &t2);
	void modulo(unsigned int n, unsigned int r);
	~term(void);
private:
	unsigned int coef;
	unsigned int exp;
	friend class polynomial;
};
